Energy saving system and method for devices with rotating or reciprocating masses

ABSTRACT

A system and method are provided for reducing the energy consumed by a pump jack electric motor by reducing the supply voltage to the motor when the motor would be generating energy in open loop mode. By substantially eliminating the energy generation mode, the braking action of the utility grid in limiting the acceleration of the motor and system that would otherwise occur is substantially removed. The motor and system will speed up, allowing the natural kinetic energy of the cyclic motion to perform part of the pumping action. In particular, when the energy consumption for the electric motor connected with the device having a rotating or reciprocating mass goes to zero, the line voltage to the motor is switched off, causing the frequency of the voltage across the motor terminals to increase. When the period of the voltage across the motor terminals returns to substantially the same as the period of the line voltage, the line voltage is switched on or reapplied to the motor.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.13/451,041 filed Apr. 19, 2012 which is a continuation-in-part ofco-pending U.S. application Ser. No. 12/873,510 filed Sep. 1, 2010,which claims the benefit of U.S. Provisional Application No. 61/240,399filed Sep. 8, 2009, and which application is a continuation-in-part ofU.S. application Ser. No. 12/207,913 filed Sep. 10, 2008, which claimsthe benefit of both U.S. Provisional Application 61/135,402 filed Jul.21, 2008 and U.S. Provisional Application 60/993,706 filed Sep. 14,2007, all of which applications are hereby incorporated by reference forall purposes in their entirety.

This application also claims the benefit of U.S. Provisional ApplicationNo. 61/485,721 filed May 13, 2011, which application is herebyincorporated by reference for all purposes in its entirety.

This application is a continuation-in-part of co-pending U.S.application Ser. No. 12/207,913 filed Sep. 10, 2008, which claims thebenefit of both U.S. Provisional Application 61/135,402 filed Jul. 21,2008 and U.S. Provisional Application 60/993,706 filed Sep. 14, 2007,all of which applications are hereby incorporated by reference for allpurposes in their entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to electric motors used to operate pump jacks andother devices with rotating or reciprocating masses.

2. Description of the Related Art

A pump jack is an above ground driving device for a reciprocating pistonpump installed downhole in an oil well. The pump jack mechanically liftsliquid out of the well when there is not enough bottom hole pressure forthe liquid to flow by itself to the surface. The pump jack is oftenpowered by an electric motor that receives electrical power from anelectric utility grid. A pump jack converts the rotary mechanism of theelectric motor to a vertical reciprocating motion to drive the downholepump. There are many different designs of pump jacks, including, but notlimited to, conventional, the Lufkin Mark II, beam-balanced,air-balanced, slant hole and conventional portable. Pump jacks areavailable from many different suppliers, including Lufkin Industries,Inc. of Lufkin, Tex. and Cook Pump Company of Coffeyville, Kans.

The pump jack electric motor usually rotates a set of pulleys to a gearsystem or transmission, which in turn drives a pair of cranks or crankarms. For a typical conventional pump jack design, the cranks raise andlower an end of a lever or beam, known as a “walking beam,” that ispivoted on a sampson post or A-frame. A curved metal box known as a“horse head” is on the other end of the walking beam from where thecrank arms are connected with the beam. A counterweight or reciprocatingmass is typically attached to one end of the cranks. A pitman armusually spans between the counterweight and the end of the walking beamopposite the horse head. A cable connects the horse head to a verticalpolished rod, which is connected to the vertical string of tubulars orsucker rods running to the downhole pump.

The counterweight assists the motor in lifting the string of sucker rodsor tubular string. When the motor lifts the counterweight upward, thehorse head moves downward, pushing the sucker rods or tubular stringdownward. After the counterweight reaches the top of its rotation, itswings around and assists the electric motor to rotate the walking beamin the opposite direction using the counterweight's momentum and mass(kinetic energy). When the counterweight is free-falling downward fromits uppermost position, the horse head moves upward, lifting the stringof sucker rods upward. U.S. Pat. No. 4,051,736 proposes an improved pumpjack for reciprocating an oil well pump.

Although there are different downhole pump designs, downhole pumps havetraditionally comprised a plunger or piston reciprocating within a pumpbarrel located at or near the end of the production tubing. Twoindependent valves typically accomplish the pumping action. A standingcheck valve may be secured in the pump barrel beneath the piston, andthe piston may include a traveling check valve. The upstroke of thepiston opens the standing valve, and draws fluid into the pump barrel asthe traveling valve remains closed. The downstroke of the piston opensthe traveling valve and forces upward the fluid from the pump barrel asthe standing barrel remains closed. U.S. Pat. Nos. 3,578,886; 4,173,451;and 6,904,973 propose downhole pumps.

It is well known that electric motors can enter an energy generationmode of operation. For an electric motor used with a pump jack, anenergy generation mode can occur at any time during the rotation of thecounterweight, depending on the condition of the balance between thecounterweight and the tubular or rod string. The condition of thebalance may fluctuate from pumping stroke to stroke, depending on theamount and composition of fluid being lifted by the rod string in eachstroke. The polished rod and attached sucker rod or tubular string maybe moving upwards or downwards in the energy generation mode.

A well owner must pay his electrical bill based upon the amount of powerthe pump jack motor consumes. The amount of energy consumed is measuredby an energy meter. In the past, the amount of power consumed wasmeasured by an analog electricity meter. Many digital electricity metersare now used. The energy meter, whether of analog or digital design, maybe configured, at the discretion of the utility company, to allow orprevent crediting the customer for generated energy that is suppliedback to the power grid. A pump jack system is such an inefficientgenerator that the quantity of consumed energy required to produce anygeneration significantly exceeds the generated energy. Therefore,regardless of whether the utility company credits generated energy, itis always beneficial to the customer to avoid energy generation.

During periods of generation, an electric motor will attempt to attain avoltage that exceeds the utility's line voltage, thereby causing currentto flow in the opposite direction. The load provided by the utility gridserves as a brake, limiting the acceleration of the electric motor thatwould have otherwise occurred. This braking action of the electric motorprevents the falling weights of the pump jack from developing additionalkinetic energy that might have assisted the pumping action. Thisconverted kinetic energy could have served as an alternative toelectrical energy from the utility grid.

In the past, engineers have tried unsuccessfully to save significantamounts of energy by turning off the pump jack electric motor during aportion of the pump jack cycle that may have included a period ofgeneration. This has been attempted with various mechanical switches andrelays. However, the parameters of the downhole pumps and wells varyover time, so these mechanical solutions have not worked.

Fluid flow in the well may vary as the well fills, and then “pumps off.”In some cases the volume of fluid pumped may change from one stroke tothe next. The changing volumes, densities, viscosities, weights, andother properties of materials and/or fluids pumped, such as gas, oil,water, and slurry, may greatly alter the combined weight of the rodstring and the column of fluid, thereby affecting the balance of thesystem and the demand on the electric motor. In some wells the tubularstrings may be thousands of feet in length. The influx of differentfluids into the well over time will significantly impact the operationof the motor.

With the introduction of the microprocessor, it became possible to turnoff the electric motor by observing the current and voltage. However,the problem was knowing when to turn the electric motor back on. Variousopen-loop time delays were unsuccessfully attempted in the past. Themicroprocessor solutions also failed since the parameters of thedownhole pumps and wells vary over time.

U.S. Pat. No. 6,489,742 proposes a motor controller that includes powerconveyance to an induction motor with a digital signal processor thatcalculates and optimizes supply of current for existent motor loadingfrom a power supply and main voltage through a control element.

U.S. Pat. No. 8,085,009 proposes an IGBT/FET-based energy savingsdevice, system and method wherein a predetermined amount of voltagebelow a nominal line voltage and/or below a nominal appliance voltage issaved. U.S. Pat. No. 8,085,010 proposes a TRIAC/SCR-based energy savingsdevice, system and method wherein a predetermined amount of voltagebelow a nominal line voltage and/or below a nominal appliance voltage issaved. U.S. Pat. No. 8,120,307 proposes a system and method forproviding constant loading in AC power applications wherein at least oneturn-on point of at least one half cycle of a modulating sine wave isdetermined, at least one turn-off point of the at least one half cycleof the modulating sine wave is determined, and at least one slicelocated between the at least one turn-on point and the at least oneturn-off point in removed. U.S. Pat. No. 8,004,255 proposes a powersupply for IGBT/FET drivers that provides separated, isolated power toeach IGBT/FET driver.

Proportional-integral-derivative (“PID”) control is a widely usedtechnique applied to control algorithms and feedback mechanisms. A PIDcontroller, as it is generally referred to, calculates a value basedupon an “error.” Typically, the “error” is calculated as the differencebetween a measured process variable and a desired set point or targetvalue. The PID controller attempts to minimize the error by adjustingthe process control variables. In essence, the PID controller is adigital filter that has proportional, integral, and derivativeparameters. The proportional value determines the reaction to thecurrent error, the integral value determines the reaction based on thesum of the recent errors, and the derivative value determines thereaction based on the rate at which the error has been changing.

The above discussed U.S. Pat. Nos. 3,578,886; 4,051,736; 4,173,451;6,489,742; 6,904,973; 8,004,255; 8,085,009; 8,085,010; and 8,120,307 areincorporated herein by reference for all purposes in their entirety.

A need exists to efficiently manage the energy usage of a pump jackelectric motor, particularly during the energy generation mode.

Energy generated from electrical motors is needlessly wasted in oilwells and other applications where energy generation can occur. Theenergy generation from the electric motor happens when the balance ofthe well is imperfect. The balance of the well may be imperfect for anumber of reasons, including, but not limited to: (1) varyingcompositions of oil, water and gas; (2) improper set-up of the wellbalance at installation; and (3) improper set-up of the well balanceafter maintenance. There are many additional factors affecting wellbalance.

In most cases, due to the well imbalance the electric motor is driven toa degree by the heavy portion of the well cycle. The energy generated bythe electric motor under such circumstances is passed through theelectricity meter in the opposite direction and may result in a credit.However, the trend with modern electricity meters is to disallow thiscredit. Even if the credit is given, the returned energy must originatefrom consumption of electrical power. While the motor is an efficientprovider of mechanical energy to operate the well, it is a veryinefficient generator in conjunction with the well mechanism andpump-rod string.

A need exists for a novel way to eliminate the energy generation fromthe motor that is fully adaptive to any well and requires no special setup procedures.

BRIEF SUMMARY OF THE INVENTION

According to one aspect of one or more embodiments of the presentinvention, a closed loop motor controller system reduces the supplyvoltage to a pump jack electric motor when the motor would be generatingenergy in open loop mode, when the phase angle between the voltage andcurrent would be greater than 90 degrees. By reducing the supply voltageto the motor, the observed phase angle between voltage and current maybe reduced to a value below 90 degrees. Under these conditions, themotor is still not consuming energy. Through pulse width modulation(“PWM”) techniques, the real power component may be reduced virtually tozero, leaving a reactive component greater than zero. By allowing somecurrent flow, primarily of a reactive nature, an observable feedbackparameter may be used in the closed loop control system as an indicationof the motor load condition, to which the motor controller may react,allowing power to be supplied when needed. Similarly, the closed loopmotor controller system may achieve further energy savings by reducingthe supply voltage to the motor when the motor is lightly loaded andconsuming energy. By minimizing or eliminating energy that wouldotherwise be consumed by the system, energy savings may result both fromreduction of the supply voltage to the motor and from the minimizationor elimination of the braking action from the utility grid on the motor.The motor and system will speed up, allowing the natural kinetic energyof the cyclic motion to perform part of the pumping action.

A target phase angle may be supplied either as a constant for all motorloads, or as a variable function of the motor load at any instant. Thetarget phase angle may be equal to or less than 90 degrees, although atarget phase angle greater than 90 degrees is also contemplated. Whenthe motor is generating or consuming energy, and the observed phaseangle in open loop mode would be greater than the target phase angle,the system may reduce the supply voltage until the observed phase angleis substantially the target phase angle. Any further reduction in theobserved phase angle below the target phase angle may be interpreted asan increase in motor load, such as during the energy consumption mode,to which the system may respond by increasing the supply voltage untilthe target phase angle is once again reached. The necessary informationmay be computed from the observed phase angle between the voltage andcurrent consumed by the motor.

According to one aspect of one or more embodiments of the presentinvention, the line (or grid) voltage and the voltage across theelectric motor terminals are monitored. During a first time segment, theelectric motor is consuming energy while driving the rotating orreciprocating mass. When the energy consumption of the electric motorgoes to zero during the pumping cycle, the supply voltage to theelectric motor is switched off, and the electric motor enters a secondtime segment. An increase in frequency of the voltage across theelectric motor terminals will occur during this second time segment. Thecyclic period of the electric motor voltage during this second timesegment will be shorter than the period of the line (or grid) voltage.When the period of the electric motor voltage returns to substantiallythe same as the period of the line (or grid) voltage, the grid power isswitched back on to the electric motor, ending the second time segmentand reentering the first time segment again. The switching back on ofthe power may occur at a zero crossing point and when the transitionsfrom positive to negative, or negative to positive, between the line (orgrid) voltage and the electric motor voltage are the same. The first andsecond time segments may be repeated. A microprocessor in conjunctionwith memory identifies the point at which power may be reapplied to theelectric motor.

Other aspects of the present invention will be apparent from thefollowing description and the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

A better and further understanding of the present invention can beobtained with the following detailed descriptions of the variousdisclosed embodiments in the drawings in which like parts are given likereference numerals, and wherein:

FIG. 1 is a block diagram of a digital signal processor (DSP) withhardware inputs and outputs in accordance with one or more embodimentsof the present invention.

FIG. 2 is a block diagram of a DSP-based motor controller in accordancewith one or more embodiments of the present invention.

FIG. 3 is a diagram showing a phase rotation detection method inaccordance with one or more embodiments of the present invention.

FIG. 4 is a flow chart showing a phase rotation detection method inaccordance with one or more embodiments of the present invention.

FIG. 5 is a graph showing power control device outputs for positivephase rotation in accordance with one or more embodiments of the presentinvention.

FIG. 6 is a graph showing power control device outputs for negativephase rotation in accordance with one or more embodiments of the presentinvention.

FIG. 7 is a block diagram of a window comparator in accordance with oneor more embodiments of the present invention.

FIG. 8 is a schematic of the window comparator in accordance with one ormore embodiments of the present invention.

FIG. 9 is a graph of a current waveform and zero-cross signals inaccordance with one or more embodiments of the present invention.

FIG. 10 is a schematic of a virtual neutral circuit in accordance withone or more embodiments of the present invention.

FIG. 11 is a graph showing power control device outputs for single phaseapplications in accordance with one or more embodiments of the presentinvention.

FIG. 12 is a three-dimensional graph showing a three-dimensional controlline in accordance with one or more embodiments of the presentinvention.

FIG. 13 is a three-dimensional graph showing a control line projectedonto one plane in accordance with one or more embodiments of the presentinvention.

FIG. 14 is a graph showing a two-dimensional plotted control line inaccordance with one or more embodiments of the present invention.

FIG. 15 is a graph showing a sweeping firing angle/duty cycle in asemi-automatic calibration in accordance with one or more embodiments ofthe present invention.

FIG. 16 is a graph showing a directed sweep of a firing angle/duty cyclein accordance with one or more embodiments of the present invention.

FIG. 17 is a graph showing plotted semi-automatic calibration data inaccordance with one or more embodiments of the present invention.

FIG. 18 is a graph showing plotted semi-automatic calibration data inaccordance with one or more embodiments of the present invention.

FIG. 19 is a graph showing plotted semi-automatic calibration data inaccordance with one or more embodiments of the present invention.

FIG. 20 is a flow chart of a semi-automatic high level calibration inaccordance with one or more embodiments of the present invention.

FIG. 21 is a flow chart of a semi-automatic high level calibration inaccordance with one or more embodiments of the present invention.

FIG. 22 is a flow chart of a manual calibration in accordance with oneor more embodiments of the present invention.

FIG. 23 is a flow chart of a fixed voltage clamp in accordance with oneor more embodiments of the present invention.

FIG. 24 is a graph showing a RMS motor voltage clamp in accordance withone or more embodiments of the present invention.

FIG. 25 is a graph showing a RMS motor voltage clamp in accordance withone or more embodiments of the present invention.

FIG. 26 is a flow chart of a stall mitigation technique in accordancewith one or more embodiments of the present invention.

FIG. 27 is a graph showing the stall mitigation technique in accordancewith one or more embodiments of the present invention.

FIG. 28 is an elevational view of one embodiment of a pump jackpositioned with a tubular string in a well in accordance with one ormore embodiments of the present invention.

FIG. 29 is a plot of observed phase angle versus time for a pump jackmotor in an open loop mode in accordance with one or more embodiments ofthe present invention.

FIG. 30 is the system block diagram connected to the motor in accordancewith one or more embodiments of the present invention.

FIG. 31 is a plot of observed phase angle versus time for a pump jackmotor in a closed loop control mode with a reduction of motor voltage toachieve a target phase angle within one complete pumping cycle inaccordance with one or more embodiments of the present invention.

FIG. 32 is a single phase waveform plot of incoming line voltage inaccordance with one or more embodiments of the present invention.

FIG. 32A is a heavily chopped single phase waveform plot of the voltagesupplied to the motor after the application of PWM techniques inaccordance with one or more embodiments of the present invention.

FIG. 32B is a lightly chopped single phase waveform plot of the voltagesupplied to the motor after the application of PWM techniques inaccordance with one or more embodiments of the present invention.

FIG. 32C is a variably chopped single phase waveform plot of the voltagesupplied to the motor after the application of PWM techniques inaccordance with one or more embodiments of the present invention.

FIG. 32D is the plot of FIG. 31 illustrating the periods when heavychopping, light chopping, and no chopping may occur in accordance withone or more embodiments of the present invention.

FIG. 33 is a block diagram of a motor controller disposed between anexisting control panel and a pump jack electric motor in accordance withone or more embodiments of the present invention.

FIG. 34 is a schematic oscillogram showing an increase in frequency ofvoltage across a motor in accordance with one or more embodiments of thepresent invention.

FIG. 35 is a flow diagram showing a method of saving energy for a pumpjack with a counterweight disposed with a well in accordance with one ormore embodiments of the present invention.

FIG. 36 is a flow diagram showing a method of saving energy for a pumpjack with a counterweight disposed with a well in accordance with one ormore embodiments of the present invention.

FIG. 37 is a flow diagram showing a method of saving energy for a pumpjack with a counterweight disposed with a well in accordance with one ormore embodiments of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Specific embodiments of the present invention will now be described indetail with reference to the accompanying figures. Like elements in thevarious figures are denoted by like reference numerals for consistency.Further, in the following detailed description of embodiments of thepresent invention, numerous specific details are set forth to provide amore thorough understanding of the present invention. In otherinstances, well-known features have not been described in detail toavoid obscuring the description of embodiments of the present invention.

With reference to FIG. 1, a block diagram of a digital signal processor(“DSP”) 1 and hardware inputs and outputs is shown. The DSP 1 canobserve the operational characteristics of a motor and make correctionsto root mean square (“RMS”) voltage for the motor that is running andunder closed loop control. Hardware inputs 2 capture phase zero crossinginputs 36, phase line voltage 37, phase motor voltage 38 and current 9and passed through the DSP 1 for processing and then onto power controldevices through the power control device outputs 14.

Referring now to FIG. 2, a block diagram of a system and method of theDSP-based motor controller 4 is shown. First, the motor controller 4reads the voltages 37 of each phase A, B and C and current 9 to capturethe zero-crossing inputs 36. At this point voltage 13 and current 9 maybe converted from analog to digital using converters 62. Next,computations 63 of motor phase angle for each phase are calculated toyield an observed phase angle 5. Next, a target phase angle 10 which hasbeen derived from a preprogrammed control line 6 is compared to theobserved phase angle 5. The difference between the target phase angle 10and observed phase angle 5 yields a resulting phase error signal (11,28) which is processed by a PID controller 12 which has proportional,integral and differential components. The output from the PID controller12 is the new control voltage (13, 29) to the motor 3, which can beobtained through the use of power control devices 33, such as TRIACs,SCRs, IGBTs or MOSFETS, to yield power control device outputs 14 of RMSmotor voltage 13 supplied with line voltages 50 for each phase formaximum energy savings.

In this closed loop system, the voltage 13 of each phase of the motor 3and the current are continually monitored. The motor controller 4 willdrive the observed phase angle 5 to the point on the calibrated controlline 6 corresponding to the load that is on the motor. At this point,maximum energy savings will be realized because the control line 6 isbased on known calibration data from the motor 3. The motor controller 4can control the motor 3 just as if a technician set the voltage 13 byhand. The difference is that the DSP 1 can dynamically respond tochanges in the load in real-time and make these adjustments on a cycleby cycle basis.

Referring now to FIG. 3, in a three-phase system, the motor controller 4is used to automatically determine the phase rotation. Zero-crossingdetectors on the line voltages provide an accurate measurement of theangle between the phase A line voltage zero crossings 15 and the phase Bline voltage zero crossings 16. For positive phase rotation 18, theangle is nominally 120° and for negative phase rotation 19, the angle isnominally 60°.

Referring to FIG. 4, a flow chart for phase rotation detection is shown.After a power-on-reset (“POR”) 20, it is easy for the motor controller 4to determine positive phase rotation 18 and the negative phase rotation19. First, the time is measured from phase A line voltage zero crossingsto phase B line voltage zero crossings 39. Next it is determined if thetime is greater than or less than 90 degrees 40. If it greater than 90degrees, then it is an ACB rotation 42. If the time is less than 90degrees, then it is an ABC rotation 41. The motor controller 4 cancontrol three-phase or single-phase motors with the same basic softwareand hardware architecture. For the three-phase case, depending on thephase rotation, the motor controller 4 can drive power control deviceoutputs 14.

Referring now to FIG. 5 which shows power control device outputs forpositive drive rotation, the motor controller drives phase A powercontrol device outputs 14 and phase B power control device outputs 14together during the phase A line voltage zero crossings 15 turn-on timeas indicated by the oval 22 a. Similarly, the motor controller drivespower control devices which drive phase B 16 and phase C power controldevice outputs 14 together during the phase B turn-on time as indicatedby the oval 22 b. Finally, the motor controller 4 drives phase C 17 andphase A power control device outputs 14 together during the phase Cpower control device outputs 14 turn-on time as indicated by the oval 22c. Note that the example shown in FIGS. 5 and 6 depicts a firingangle/duty cycle 23 of 90°.

Referring now to FIG. 6 which shows the TRIAC drive outputs for negativephase rotation, the motor controller 4 drives phase A power controldevice outputs 14 and phase C power control device outputs 14 togetherduring the phase A line voltage zero crossings 15 turn-on time asindicated by the oval 22 c. Similarly, the motor controller 4 drivesphase B 16 and phase A power control device outputs 14 together duringthe phase B line voltage zero crossings 16 turn-on time, as indicated byoval 22 a. Finally, the motor controller drives phase C power controldevice outputs 14 and phase B power control device outputs 14 togetherduring the phase C line voltage zero crossings 17 turn-on time, asindicated by oval 22 b.

Now referring to FIG. 7, a block diagram of a window comparator isshown. The DSP based motor controller uses the window comparator 88 todetect zero-crossings of both positive and negative halves of a currentwave form. When RMS motor voltage is reduced by the motor controller, itis difficult to detect zero crossings of current waveform because thecurrent is zero for a significant portion of both half cycles. First,motor current is provided 89, a positive voltage is provided 90 as areference for a positive half cycle and a negative voltage is provided91 as a reference. Next, the current, positive voltage and negativevoltage are presented to two comparators 92 and are then passed throughan OR gate 93 to create a composite zero-cross digital signal 94.

As further illustrated in FIG. 8, a schematic of the window comparator88 is shown. The motor current is provided 89, a positive voltage isprovided 90 as a reference for a positive half cycle and a negativevoltage is provided 91 as a reference. Next, the current, represented asa positive voltage and negative voltage, is processed by two comparators92 and are then passed to an OR gate 93 to create a composite zero-crossdigital signal 94.

Further, FIG. 9 shows graphs of a current waveform 95, a positivevoltage half cycle 96, a negative voltage half cycle 97 and an ORfunction 98.

Now referring to FIG. 10, a schematic of a virtual neutral circuit isshown. A virtual neutral circuit may be used as a reference insituations where three phase power is available only in delta mode andthere is no neutral present for use as a reference. The virtual neutralcircuit comprises three differential-to-single-ended amplifiers 77.Because phase to phase voltages are high, input resistors 78 are used toform a suitable attenuator 79 together with feedback resistors 80 andground reference resistors 81. Because the danger exists of a loss ofphase, protection diodes 82 are used to protect thedifferential-to-single-ended amplifiers 77. Thedifferential-to-single-ended amplifiers 77 are coupled to a summingamplifier 83 through DC blocking capacitors 84 and summing resistors 85together with the feedback resistor 80. The output of the summingamplifier 83 is boosted by amplifier 27 thereby providing a lowimpedance output which is at neutral potential. Additional resistorsdivide a supply rail thereby allowing the summing amplifier 83 to handlealternating positive and negative signals. An alternate connection isavailable in the event that a neutral 86 is available along with ajumper block for alternate neutral connection 87.

Referring now to FIG. 11 showing a power control device output 14 for asingle-phase application, the output 14 for phase A is turned on eachhalf-cycle based on a power control device output 14 derived from thevoltage zero-crossing input 15. The power control device output 14 forphase B line voltage zero crossings and phase C line voltage zerocrossings are disabled in the DSP 1 and the hardware may not be present.The power control device outputs 14 are not paired as they were in thethree-phase case.

Referring now to FIG. 12 which illustrates a three-dimensional controlline for the motor operating space of a motor bounded by an observedphase angle 5 on the y-axis. A controlled firing angle/duty cycle 23showing the decrease in voltage is shown on the x-axis and the percentload 24 on a motor is shown on the z-axis.

Every motor operates along a parametrical control line 25 within itsoperating space. For example, when a given motor is 50% loaded and thefiring angle/duty cycle 23 is set to 100°, a phase angle 5 ofapproximately 55° is observed.

The parametrical control line 25 shown in FIG. 12 is defined by fiveparametric operating points 26 ranging from a loaded case 44 in theupper left corner, to an unloaded case 45 in the lower right corner.Furthermore, the parametrical control line 25 has special meaningbecause it is the line where a motor is using the least energy possible.If the firing angle/duty cycle 23 is increased and the motor voltage 13decreased then a motor would slow down and possibly stall. Similarresults would be seen if the load on the motor 3 is increased.

As illustrated in FIG. 13, the parametric control line 25 may beparameterized and projected onto one plane described by phase angle 5 inthe vertical direction and the firing angle/duty cycle 23 in thehorizontal direction.

Further, as shown in FIG. 14, the parametrical control line 25 may bedisplayed on a two-dimensional graph. On the x-axis, increasing firingangle/duty cycle 23 may be equated with a decreasing motor voltage. Thisis because small firing angle/duty cycles result in high voltage andlarge firing angle/duty cycles result in low voltage. The motorcontroller will drive the observed phase angle 5 to the point on thecontrol line 25 that corresponds to the load presently on a motor. Toaccomplish this, a DSP computes the phase angle 5 between the voltageand current.

Referring back to the block diagram of FIG. 2, the DSP 1 then computesthe next target phase angle 5 based on the present value of the RMSvoltage 13, or equivalently the present value of the firing angle/dutycycle. The difference between the observed phase angle and the targetphase angle 10 results in a phase angle error, which is processedthrough a PID controller 12 or similar device to generate a new controltarget. This control target changes the voltage in such a way as tominimize the phase angle error. The target phase angle 10 is dynamic andit changes as a function of the firing angle/duty cycle.

As stated above, the motor controller 4 will drive the observed phaseangle 5 to the point on the control line 25 that corresponds to the loadpresently on the motor 3. This operating point 26 provides the maximumenergy savings possible because the control line 25 is calibrateddirectly from the motor 3 that is being controlled.

This method for calibration is called semi-automatic calibration. Thesemi-automatic calibration is based on the DSP 1 sweeping the controlspace of the motor. As shown in FIG. 15, sweeping the control spacemeans that the DSP increases the firing angle/duty cycle 23 and recordsthe current 9 and firing angle/duty cycle 23 of each phase at discretepoints along the way. Thus, in this manner it is possible to see thebeginning of the stall point 21 of the motor. A well-defined linearportion of observed calibration data curve obtained from sweeping thecontrol space 7, which is used to determine points on the control line6, has a constant negative slope at lower firing angle/duty cycles 23.Then, as the firing angle/duty cycle 23 continues to increase, thecurrent 9 begins to flatten out and actually begins to increase as themotor 3 begins to slip and starts to stall, called the “knee” 31.

As shown in FIG. 16, subsequent sweeps can be directed at smaller rangesof motor voltages to “zoom in” on the knee. The motor controller 4requires multiple sweeps in order to get data that is statisticallyaccurate. There is a tradeoff between the number of sweeps and the timerequired to calibrate the control line 25. A measure of the quality ofthe calibration can be maintained by the DSP 1 using well knownstatistical processes and additional sweeps can be made if necessary.This is true because the DSP 1 has learned the approximate location ofknee 31 from the first sweep.

There is little danger of stalling during the semi-automatic sweepbecause of the controlled environment of the setup. A technician oroperator helps to insure that no sudden loads are applied to the motor 3under test while a semi-automatic calibration is in progress.

The process of sweeping the control space can be performed at any fixedload. For example, it can be performed once with the motor 3 fullyloaded and once with the motor 3 unloaded. These two points become thetwo points that define the control line 25. It is not necessary toperform the calibration at exactly these two points. The DSP 1 willextend the control line 25 beyond both these two points if required.

There are many numerical methods that can be applied to find the stallpoint 21 in the plot of the current motor voltage 23. As shown in FIG.17, a method is to use the “least squares” method to calculate astraight line that best fits the accumulated data tabulated from thefirst five motor voltages 23.

The continuation of this method is shown in FIG. 18. Using the previousdata points the value of the current 9 may be predicted. Graphically,the DSP 1 is checking for one or more points that deviate in thepositive direction from the predicted straight line.

As shown in FIG. 19, the DSP 1 is looking for the beginning of the kneein the curve. The first point that deviates from the predicted controlline may or may not be the beginning of the knee 31. The first pointwith a positive error may simply be a noisy data point. The only way toverify that the observed calibration data curve obtained from sweepingthe control space 7 is turning is to observe data obtained fromadditional sweeps.

Semi-automatic calibration may be performed in the field. Referring nowto FIG. 20, a flow chart showing how semi-automatic calibration isperformed is shown. First the motor 3 is placed in a heavily loadedconfiguration 44. Ideally this configuration is greater than 50% of thefully rated load. Next a calibration button 32 on the motor controller 4is pressed to tell the DSP 1 to perform a fully-loaded measurement. TheDSP 1 runs a calibration 46 which requires several seconds to explorethe operating space of the motor 3 to determine the fully-loaded point.The motor controller 4 indicates that it has finished this step byturning on an LED.

Next the motor 3 is placed in an unloaded configuration 45. Ideally thisconfiguration is less than 25% of the rated load. Then a calibrationbutton 32 on the motor controller 4 is pressed 47 to tell the DSP 1 toperform an unloaded measurement. The DSP 1 runs the calibration 46 todetermine the unloaded point. The motor controller 4 indicates that ithas finished calibrating both ends 47 of the control line 25 by turningon a light emitting diode (“LED”). The DSP 1 then determines the controlline 48 using the two measurements and applies this control line when itis managing the motor 3. The values of the control line 25 are stored innon-volatile memory 49.

FIG. 21 shows a more detailed flow chart of the semi-automaticcalibration. First a first calibration sweep is run 46 with the motorvoltage set at a certain degree 51, depending on if it is a first sweepor previous sweeps have been run 106, in which the motor controllermeasures the motor 52 until the motor controller detects a knee 53. If aknee 53 is detected the firing angle/duty cycle is decreased by twodegrees 54 and the phase angle and the motor voltage are recorded to thememory 55. This process is repeated to obtain at least four sweeps 56 toget a computed average value 57 of the phase angle and the firingangle/duty cycle. If during any step along the calibration sweep, theknee is not detected, then the firing angle/duty cycle is increased byat least one degree 58 and the nest step is measured 59.

An alternative method for calibration is called manual calibration. FIG.22 shows a flow chart of manual calibration. First a motor is placed ona dynamometer 70. Next the motor is connected to a computer for manualcontrol 71 which allows the motor to be run in a open-loop mode and thefiring angle/duty cycle of the AC induction motor to be manually set toany operating point. Then the motor is placed in a fully unloadedconfiguration 45. Next the firing angle/duty cycle is increased and theRMS motor voltage is reduced 72 until the motor is just about to stall.The firing angle/duty cycle and phase angle are recorded and thisbecomes a calibrated point which is recorded 73. Then the motor isstarted with drive elements fully on 74. Then the motor is placed in afully loaded configuration 44. Next the firing angle/duty cycle isincreased or decreased until the RMS motor voltage is chopped by themotor controller 75 until the motor is just about to stall. The firingangle/duty cycle are recorded and this becomes another calibrated pointwhich is recorded 73. Finally the two calibrated points are used to forma control line 76.

When the RMS line voltage is greater than a programmed fixed-voltage,the DSP controller clamps the RMS motor voltage at that fixed voltage soenergy savings are possible even at full load. For example, if the mainsvoltage is above the motor nameplate voltage of 115V in the case of asingle phase motor then the motor voltage is clamped at 115V. Thisoperation of clamping the motor voltage, allows the motor controller tosave energy even when the motor is fully loaded in single-phase orthree-phase applications.

FIG. 23 shows a flow chart of the fixed voltage clamp. First a phaseerror is computed 64. Next a voltage error is computed 65. Then the RMSmotor voltage of the AC induction motor is determined and compared to afixed voltage threshold 66. If the RMS motor voltage is greater than thefixed voltage threshold then it is determined whether or not controltarget is positive 67. If the control target is positive then a voltagecontrol loop is run 68. If the RMS motor voltage of the AC inductionmotor is less than a fixed-voltage threshold, then the a control lineclosed loop is run 69 and the entire process is repeated. If the controltarget is determined not to be positive then a control line loop is run69 and the entire process is repeated again.

In some cases, it may not be possible to fully load the motor 3 duringthe calibration process. Perhaps 50% is the greatest load that can beachieved while the motor is installed in the field. Conversely, it maynot be possible to fully unload the motor; it may be that only 40% isthe lightest load that can be achieved.

FIG. 24 shows an example of both load points being near the middle ofthe operating range. On the unloaded end 45 at the right of the controlline 25, the DSP 1 will set the fixed voltage clamp 60 of the voltage atminimum voltage 35. When the load on the motor increases, the DSP 1 willfollow the control line moving to the left and up the control segment61. This implementation is a conservative approach and protects themotor 3 from running in un-calibrated space.

As further shown in FIG. 25, on the fully loaded end 44 at the left, theDSP 1 will synthesize a control segment 61 with a large negative slope.This implementation is a conservative approach and drives the voltage tofull-on.

Referring now to FIG. 26, the DSP-based motor controller uses a specialtechnique to protect a motor from stalling. First, the DSP activelymonitors for a significant increase in current 99 which indicates thatload on the motor has increased. Next, if a significant increase isobserved 100 then the DSP turns motor voltage to full on 101. Next, theDSP will attempt to reduce motor voltage to return to the control 102and the DSP returns to actively monitoring for a significant increase incurrent 99. This technique is a conservative and safe alternative to theDSP attempting to track power requirements that are unknown at thattime.

As further shown in FIG. 27, a graph of the stall mitigation technique,the load on the motor is represented on an x-axis and time isrepresented on a y-axis. The bottom line represents the load on themotor 103 and the top line represents the power applied to the motor bythe DSP 104. Prior to point a 105, the DSP is dynamically controllingthe motor at a fixed load. In between point a 105 and point b 30, theload on the motor is suddenly increased and the DSP turns the motorvoltage to full on. At point c 34, the DSP reduces the motor voltage topoint d 43.

In FIG. 28, a pump jack 30′ is positioned on the ground adjacent well W.Prime mover or motor 6′ drives gear system or transmission 8′ with drivebelt 18′. Motor 6′ may be connected with a electric utility grid for thesupply of power. One end of counterweight arm or crank arm 10′ isdisposed with gear system 8′, and the other end of counterweight arm 10′is disposed with counterweight or rotating mass 12′. There arepreferably two counterweight arms 10′, with counterweight 12′ disposedbetween them. Lever or walking beam 2′ pivots on sampson post or A-frame14′. One end of pitman arm or beam arm 16′ is rotationally attached withone end of beam 2′, and the other end of beam arm 16′ is rotationallyattached with rotating mass 12′ and an end of counterweight arm 10′.Beam protrusion or head 4′ is disposed on the end of beam 2′ adjacent towell W. As can now be understood, pump jack 30′ has a conventionaldesign.

One end of cable 20′ is attached with beam head 4′, and the other end ofcable 20′ is attached with polished rod or rod 22′. Rod 22′ is disposedwith the substantially vertical tubular string or sucker rods 26′extending in the well W through the production tubing to the downholepump 28′. Tubular string may comprise sucker rods, pipe, tubulars, orother components used with a pump jack or other similar device to assistin pumping or lifting fluids from a well. The motor 6′ may drive thepump jack 30′ by rotating an end of the counterweight arm 10′ about ahorizontal axis. As the counterweight 12′ moves upward, beam 2′ pivotsabout a horizontal axis on A-frame 14′ and moves the beam head 4′downward. As the counterweight 12′ moves past its uppermost position, itfree-falls downward due to gravity and its momentum, and beam 2′ pivotsabout A-frame 14′ and moves beam head 4′ upward. The pushing and pullingof the string of tubulars 26′ by the beam head 4′ operates the piston inthe downhole pump 28′. The tubular string 26′ moves and reciprocatessubstantially vertically in the well W.

The motor 6′ is normally in energy consumption mode. However, the motor6′ may be in the energy generation mode when the falling masses (eitherthe counterweight 12′ or the rod or tubular string 26′) arefree-falling, thereby accelerating the motor 6′ beyond its synchronousspeed, where the speed is limited by the generated current. Although anexemplary conventional pump jack 30′ is shown in FIG. 28, it iscontemplated that all pump jack designs, including, but not limited to,different conventional designs, the Lufkin Mark II design, beam-balanceddesign, and conventional portable design may be used with theembodiments of the invention. Although the embodiments are shown withpump jacks, it is also contemplated that all of the embodiments may beused with any device having a rotating or reciprocating mass.

Turning to FIG. 29, plot 36′ with observed phase angle on the verticalaxis 32′ and time on the horizontal axis 34′ is shown for an electricmotor attached to a pump jack, such as motor 6′ and pump jack 30′ inFIG. 28, in open loop mode. The embodiments of the invention describedbelow with FIGS. 30-32D have not been attached to the electric motor;therefore, the motor is in the open loop mode. Second horizontal line40′ is drawn at an observed phase angle of 90 degrees on the verticalaxis 32′. When the plot 36′ exceeds an observed phase angle of 90degrees, which it does in plot first segment 42′ above second horizontalline 40′, then the motor is in the energy generation mode. At thosetimes when the motor is generating, rather than consuming energy, thecurrent lags the voltage by a phase angle in excess of 90 degrees. Thegreater the phase angle during generation, the greater the power beinggenerated. The motor is in the heavy energy consumption mode in plotsecond segment 44′ below first horizontal line 38′. First horizontalline 38′ is drawn at a target phase angle less than 90 degrees on thevertical axis 32′. The target phase angle is discussed in detail belowwith FIGS. 30 and 31.

In FIG. 30, closed loop motor controller 50′ is schematically shownconnected to an electric motor 62′, such as motor 6′ in FIG. 28, whichmay be connected with a pump jack, such as pump jack 30′ in FIG. 28.Other pump jack designs are also contemplated for use with FIG. 30.Motor controller 50′ may be a PID controller. However, other closed loopmotor controllers are also contemplated. A DSP based motor controller iscontemplated, such as the DSP based motor controller in FIGS. 1 and 2,although other types of DSP based motor controllers are alsocontemplated. Closed loop motor controller 50′ may be connected withmotor (6′, 62′) in the same manner as shown in FIGS. 1 and 2. Amicroprocessor based controller is also contemplated. In one embodiment,the closed loop controller system may have a PID controller as acomponent. In the closed loop control system or servo system 48′,controller 50′ may compute 52′ the observed phase angles from thevoltage and current supplied to the motor 62′.

Advantageously, no sensors need to be positioned with the motor (6′,62′), the pump jack 30′ or the downhole pump 28′. Further, the closedloop system 48′ may be adaptive to each individual downhole pump and tochanging parameters and requirements of the pump and well over time,including, but not limited to, changing volumes, densities, viscosities,weights, and other properties of materials and/or fluids pumped, such asgas, oil, water, and slurry. Voltage and current monitored by the system48′ serve as an indicator of the well condition, allowing the system tobe adaptive to the changing well parameters. Monitoring the voltage andcurrent on a substantially continuous basis allows for a substantiallycontinuous reading of well conditions. The closed loop system 48′ alsoadapts when the existing components of the pump jack system are replacedwith other components having different characteristics, such as forexample replacing the tubular string with a different tubular stringhaving a different weight, or replacing the counterweight with adifferent sized counterweight, provided that the mechanical system isrebalanced after the components are substituted. After rebalancing ofthe mechanical system, the embodiments of the invention allow the energysavings to resume.

A target phase angle 58′ input into the controller 50′ may be comparedwith the computed observed phase angle 52′, and the error 60′ ordifference between the two values determined by the controller 50′. Itis contemplated that the target phase angle 58′ may be substantially 90degrees, or the target phase angle 58′ may be greater or less than 90degrees. At the time of installation, a target phase angle 58′ may beselected that produces optimum results for the motor in use. The targetphase angle 58′ may be constant for all motor loads, such as 65 degrees,although other constant target phase angles 58′ are also contemplated.The target phase angle 58′ may also be a variable function of the motorload at any instant. The setting for the target phase angle 58′ may bethe lowest possible target phase angle that maintains a sufficientlyobservable current flow at all times while still supplying sufficientpower to meet the motor's requirements at all loads.

The motor controller 50′ may control the supply motor voltage 54′applied to motor 62′ based upon the error 60′. When the error 60′ issignificant because the observed phase angle is too large, such asduring the period of open loop energy generation mode, controller 50′may reduce the supply motor voltage to the motor 62′ to a lower value,such as to reduce the observed phase angle 52′ to the target phase angle58′. When the error 60′ is significant because the observed phase angle52′ is too small, such as during the heavy energy consumption mode,controller 50′ may increase the supply voltage 54′ to the motor 62′ to ahigher value to move the observed phase angle 52′ to the target phaseangle 58′. In this closed loop system 48′, the voltage and current maybe continuously monitored and controlled by the motor controller 50′. Itis also contemplated that the supply voltage 54′ may be controlledthrough the use of power control devices, such as TRIACs, SCRs, IGBTs,or MOSFETs, as shown in FIG. 2. Also, controller 50′ uses timers andpulse width modulation (“PWM”) techniques to control the supply voltage,which are discussed in detail below with FIGS. 32-32D. Other techniquesare also contemplated.

Returning to FIG. 30, the controller 50′ reads the voltages of eachphase and current in the motor 62′ to capture the zero-crossing points.FIGS. 5 and 6 of U.S. Pat. No. 8,085,009 B2 propose an oscillogram andcircuitry diagram, respectively, of a volts zero crossing pointdetermining means that is contemplated. Other types of volts zerocrossing point determining means are also contemplated. Voltage andcurrent may be converted from analog to digital using one or more analogto digital converters for monitoring and/or control purposes, as shownin FIG. 2. Controller 50′ may perform computations 52′ of motor phaseangle to yield an observed phase angle. Controller 50′ may compare theobserved phase angle 52′ with the target phase angle 58′ and control thesupply motor voltage 54′ in response. The phase angle may be monitoredin one or more phases. Controller 50′ may be used to automaticallydetermine the phase rotation. A circuit diagram of a phase support meansand phase rotation determination means that is contemplated is proposedin FIG. 7 of U.S. Pat. No. 8,085,009, where multiple phase operationsare employed.

Further, it is contemplated that the voltages may be monitored fromphase-to-phase or from phase-to-neutral. A schematic of a contemplatedvirtual neutral circuit is in FIG. 10. Other virtual neutral circuitsare also contemplated. A virtual neutral circuit may be used as areference in situations where three phase power is available only indelta mode and there is no neutral present for use as a reference. It isalso contemplated that a window comparator may be used to detectzero-crossings of both positive and negative halves of a current waveform. A window comparator is illustrated in FIGS. 7 and 8. Other windowcomparators are also contemplated. FIGS. 8, 9 and 10 of U.S. Pat. No.8,085,009 propose a circuit diagram and then two oscillograms,respectively, of a half cycle indentifying means that is contemplated.

Turning to FIG. 31, plot 64′ with observed phase angle on the verticalaxis 32′ and time on the horizontal axis 34′ is shown for an electricmotor attached with a pump jack, such as motor 6′ and pump jack 30′ inFIG. 28, in closed loop mode. As in FIG. 29, there is a target phaseangle of less than 90 degrees at first horizontal line 38′. Unlike inFIG. 29, the electric motor output represented in FIG. 31 is from aclosed loop system 48′ disposed with the motor as shown in FIG. 30. Plotfirst segment 70′ in FIG. 31 is where the observed phase angle wouldexceed the target phase angle in open loop mode. However, in closed loopmode in plot first segment 70′ the error signal 60′ creates a controleffort by the controller 50′ to reduce the supply voltage 54′ to themotor to maintain the target phase angle 38′. When the observed phaseangle would exceed 90 degrees in open loop mode, the large values ofobserved phase angle create large values of the error signal 60′ in FIG.30.

During plot first segment 70′, the motor is effectively turned off usingPWM techniques, but without actually cutting the power to the motor.There is still current flowing in the motor during this time, whichallows the controller 50′ to know when to increase the supply voltage tothe motor needed during the energy consumption mode. The real componentof the current may be reduced virtually to zero, leaving a reactivecomponent greater than zero. By allowing some current flow when it isreducing voltage, mostly of a reactive nature, an observable feedbackparameter is provided that is used in the closed loop control system 48′as an indication of the load condition, to which the controller 50′ mayreact, supplying power when needed in the energy consumption phase.

Since the current is of reactive nature, the only power remaining is ofan apparent nature. The current flow allows the controller tocontinuously observe the phase angle between the current and thevoltage. The maximum motor voltage reduction occurs approximately atplot first location 66′ in FIG. 31 when the observed phase angle in openloop mode as shown in FIG. 29 would otherwise be at its maximum valuegreater than 90 degrees.

When the observed phase angle exceeds the target phase angle in closedloop mode, the supply voltage may be reduced with PWM techniques untilthe observed phase angle reaches the target phase angle. At thebeginning of plot first segment 70′ in FIG. 31, the motor controller 50′reduces the observed phase angle from open loop mode down to the targetphase angle. The controller 50′ thereafter maintains the observed phaseangle substantially at the target phase angle. Any further reduction inobserved phase angle below the target phase angle may be interpreted asan increase in load, to which the controller 50′ may respond byincreasing the supply voltage 54′ until the target phase angle is onceagain reached. The maximum increase of supply voltage to the motoroccurs at plot second location 68′ when the observed phase angle dropsbelow the target phase angle. When the counterweight or reciprocatingmass is driven by the motor, the values of the observed phase angle willtypically be smaller than the target phase angle, which will create anerror signal that creates a control effort by the controller 50′ toincrease the supply voltage to the motor. The motor is in the heavyenergy consumption mode in plot second segment 44′ below firsthorizontal line 38′.

Turning to FIG. 32, waveform plot 200 of incoming line voltage isillustrated in single phase, although three-phase voltage is alsocontemplated. In FIG. 32A, PWM techniques have been used to chop out orremove voltage waveform plot segments 204 while leaving voltage waveformplot segments 202. FIG. 32A illustrates heavy chopping of the supplyvoltage in which large segments 204 of the voltage waveform are choppedout. FIG. 32B illustrates light chopping of the voltage waveform withPWM techniques, wherein the voltage waveform plot segments 206 that arechopped out are smaller than the chopped out segments 204 shown in FIG.32A. In FIG. 32B, the waveform plot segments 208 that are left arelarger than the waveform plot segments 202 that are left in FIG. 32A.

The heavy chopping in FIG. 32A occurs during the period that open loopenergy generation mode would be occurring, such as in FIG. 31 at plotfirst location 66′. In FIG. 32D, the period of heavy chopping isillustrated at plot segment 210. The reduction of voltage shown in FIG.32A reduces the real component of the current virtually to zero, whileleaving a reactive component greater than zero. This is the period whenthe motor is effectively turned off, while still leaving sufficientcurrent to observe the phase angle.

When the motor is in heavy energy consumption mode, such as occurs inFIG. 31 at plot second segment 44′, then substantially no voltagewaveform segments are eliminated, and the motor supply voltage issubstantially as shown in FIG. 32. In FIG. 32D, the period ofsubstantially no chopping occurs at plot segment 212.

In FIG. 32D, the DSP controller is in control mode at plot locations 226and 228. During those periods, the motor is not in heavy energyconsumption mode and not in the period when open loop energy generationmode would be occurring. In control mode, light chopping as shown inFIG. 32B may occur or variable chopping as shown in FIG. 32C may occurto control the motor voltage. This may happen when the motor is lightlyloaded, saving energy while the motor is still consuming energy.Variable chopping in FIG. 32C uses PWM to chop waveform plot segments(214, 216, 218, 220, 222, 224) of varying sizes to control the motorvoltage. The size of the voltage waveform plot segments (214, 216, 218,220, 222, 224) chopped in FIG. 32C may all be different, leaving voltagewaveform plot segments that are also all different sizes.

It should be understood that the motor controller may use anycombination or permutation of light chopping, heavy chopping, variablechopping or no chopping to control the observed phase angle of the motorsupply voltage to the target phase angle. The DSP or motor controllerattempts to maintain a substantially constant observed phase angle andwill chop the amount required to do so. The DSP controls the motorvoltage based on observing the phase angle. The amount of the choppingof the supply voltage may vary.

When the electric motor running open loop is in energy generation mode,the load presented by the utility grid effectively acts as a brake onthe motor, thereby limiting its speed. This occurs due to the generatedvoltage attempting to exceed the voltage presented by the utility,thereby causing the current presented to flow in the opposite direction.When the closed loop controller system and method is applied as shown inFIGS. 30-32D, this braking action may be effectively minimized orremoved, and the motor and system will typically speed up during thistime. This additional kinetic energy stored in the system will be usedto perform a portion of the pumping action without consuming energy inthe motor. Minimizing or substantially preventing energy generationeliminates the need to consume energy in other parts of the pumpingcycle, thereby saving energy.

As can now be understood, the electric power supplied to the motor is“effectively” turned off during the energy generation mode that wouldoccur in open loop, while maintaining the feedback signals of voltageand current to determine when to turn the electric motor back on whenthe observed phase angle is diminishing. This system and method willconstantly adapt to changing parameters in the well, which could not bedone in the past. For one example, the motor and system are adaptive topumping two or more fluids at different times having different densitiesor weights. Voltage and current monitored by the system serve as anindicator of the well condition, allowing the system to be adaptive tothe changing well parameters. By not entering the energy generationmode, the braking action that is created by the open loop energygeneration mode may be minimized or eliminated, so the benefit of speedup in the system is obtained. By minimizing or eliminating energy thatwould otherwise be consumed by the system, energy savings may resultboth from reduction of the supply voltage to the motor and from theminimization or elimination of the braking action of the motor when ingeneration mode.

All types and designs of electric motors are contemplated for use withthe different embodiments of the invention described above, including,but not limited to, AC induction motors and AC synchronous motors. Alltypes and designs of pump jacks are contemplated for use with thedifferent embodiments of the invention described above, including, butnot limited to, all conventional designs, the Lufkin Mark II design,beam-balanced design, and conventional portable design. Although theembodiments have been shown with pump jacks, it is also contemplatedthat all of the embodiments described above may be used with any devicehaving a rotating or reciprocating mass. Although some of theembodiments have been shown with single phase voltage and current, allof the embodiments of the invention are contemplated with single ormultiple phase voltage and current.

In one or more embodiments of the present invention, power provided byan electric utility grid or other line source to power an electric motorthat is itself configured to power a pump jack may be selectivelyremoved and then reapplied to the electric motor such that the electricmotor does not consume nor provide power from or to the electric utilitygrid or other line source during a period of generation by the electricmotor.

The point at which the power to the motor is removed is the point wherethe consumption of the motor substantially goes to zero. This may beachieved by monitoring the observed phase angle and comparing it with atarget phase angle, such as 90 degrees. At that point, the switch offpoint may be activated. At the time of switch off there is no powerapplied to the motor. The motor may be disconnected from the powercontroller. Under such circumstances, without the motor generated powerbeing returned to the electric utility grid, the potential electricalenergy exists as kinetic energy in the overall rotating andreciprocating mechanism. This energy causes the well cyclic times toincrease. Since the motor is still mechanically connected to theaccelerating rotating or reciprocating mass or machine, the motor'srotational speed increases. Under these circumstances, the potentialenergy of the motor, in generation, will exhibit an increase infrequency of the voltage across its terminals. The cyclic period of themotor voltage will be shorter than the period of the grid voltage.

To ascertain the point at which the power should be reapplied to themotor, the period of the line voltage is compared to the period of thegenerated voltage. When the period of the generated voltage returns tosubstantially the same as the period of the line voltage, the power canbe reapplied to the motor. It is contemplated that when the cyclicperiod of the generated voltage is substantially the same as the linevoltage, the power may be turned back on at a zero crossing point whenthe transitions are identical. Turning power back on at a zero crossingassures that there will be no current spikes. Also, matching thetransitions from positive to negative, or visa versa, of the linevoltage and the generated voltage allows for smooth transitions.Measuring the periods can be achieved through use of zero crossingtechniques applied to both the line and motor volts. A microprocessor inconjunction with memory can identify the point at which power can bere-applied. Other systems are also contemplated.

Returning to FIG. 30, an exemplary installation of a closed loop motorcontroller 50′ implementing the method is schematically shown connectedto an electric motor 62′, which may be connected with a pump jack. Motorcontroller 50′ may be a PID controller. However, other closed loop motorcontrollers are also contemplated. A DSP based motor controller iscontemplated, such as the DSP based motor controllers in FIGS. 1 and 2,although other types of DSP based motor controllers are alsocontemplated.

Closed loop motor controller 50′ may be connected with motor 62′ in thesame manner as shown in FIGS. 1 and 2. A microprocessor based controlleris also contemplated. In one embodiment, the closed loop controllersystem may have a PID controller as a component. In the closed loopcontrol system or servo system 48′, controller 50′ may compute 52′ theobserved phase angles from the voltage and current supplied to the motor62′.

Turning to FIG. 33, another exemplary installation of a motor controller410 implementing the method is shown. Motor controller 410 may be thesame as motor controller 50′. Motor controller 410 may be inserted inelectrical connection between the existing electrical control panel 405and the electric motor 415 that drives the pump jack 420. The electricpower supply may run through a utility meter 400 to the control panel405.

In FIG. 34, first plot 500 is the exemplary line or grid voltage, shownwith a frequency of 60 Hz and first plot half period 505. The zerointersect-to-intersect 505 forms one half cycle of one of the 60 Hzperiods. The zero crossing is used rather than the peak as the zerocrossing is easier to more accurately determine the exact start andexact finish point. The peak of the sign wave first plot 500 isdifficult to determine since the rate of change at the peak is theslowest transition and the zero cross is the fastest point. The motor(62′, 415) is supplied with the line voltage during the first timesegment when the motor (62′, 415) is consuming power to drive therotating or reciprocating mass. The motor (62′, 415) ceases to consumeenergy during the well pumping cycle when the observed phase angleexceeds a target phase angle, such as 90 degrees. At that time, thesupply voltage to the motor (62′, 415) is switched off, and the secondtime segment is entered.

As discussed above, the motor's rotational speed increases during thesecond time segment when the motor (62′, 415) is removed from theelectric grid as the reciprocating or rotating mass accelerates. Thepotential energy of the motor (62′, 415) exhibits an increase infrequency of the voltage across the motor's terminals. Second plot 510,third plot 520, and fourth plot 530 are exemplary voltages across themotor at different times during the second time segment when the motor(62′, 415) has been disconnected from the line voltage. Thereciprocating or rotating mass accelerates and causes the motor (62′,415) to rotate faster. Second plot 510 is at a frequency of 63 Hz, thirdplot 520 is at a frequency of 66 Hz, and fourth plot 530 is at afrequency of 69 Hz. Other frequencies are also contemplated.

Second plot cyclic half period 515, third plot cyclic half period 525,and fourth plot cyclic half period 535 are all shorter than the firstplot cyclic half period 505 of the grid voltage or first plot 500. Thezero intersect-to-intersect 515 forms one half cycle of one of the 63 Hzperiods. The zero intersect-to-intersect 525 forms one half cycle of oneof the 66 Hz periods. The zero intersect-to-intersect 535 forms one halfcycle of one of the 69 Hz periods. When the cyclic period of the voltageacross the motor (62′, 415) returns to substantially equal the cyclicperiod of the grid voltage or first plot 500, then the power is switchedback on to the motor (62′, 415), and it reenters the first time segment.It is also contemplated that when the cyclic period of the generatedvoltage is substantially the same as the line voltage, the power may beturned back on at the zero crossing point when the transitions areidentical. The first time segment and second time segment are thereafterrepeated as described above.

With regard to FIG. 34, it can be seen that the higher rate or frequencyis accompanied by a shorter period in time. The pump and/or rotating orreciprocating mass accelerates when the power supply to the motor isremoved, and the period between the zero crossings shortens. This willcontinue to a maximum deviation, and then reduce back to the period ofthe line power. During the second time segment, the microprocessor willcontinually monitor and compare the periods. When the period issubstantially equal to the period of the line power, the line power willbe turned back on to fulfill the work requirement of the pumping cycle.

In FIG. 35, a method of saving energy for a pump jack with acounterweight disposed with a well in accordance with one or moreembodiments of the present invention is shown. In Step S1, a utilitygrid or line voltage and current is full on to an electric motor duringa first time segment where the electric motor is connected with the pumpjack. In Step S2, the pump jack counterweight is in a consumption modewhile being rotated by the electric motor during the first time segment.In Step S3, a phase angle between the utility grid or line voltage andcurrent supplied to the electric motor during the first time segment isobserved and measured. In Step S4, the observed phase angle is comparedwith a target phase angle during the first time segment. If the observedphase angle is not greater than the target phase angle, then Step S3 isrepeated. In Step S5, the line voltage and current to the electric motoris switched or turned off when the observed phase angle is greater thanthe target phase angle. In Step S6, a generated motor voltage of theelectric motor is observed during a second time segment initiated by theswitching off of the line voltage and current to the electric motor inStep S5. In Step S7, a period of the generated motor voltage of theelectric motor is determined or measured during the second time segment.In Step S8, a period of the line voltage is determined during the secondtime segment. In Step S9, the period of motor voltage is compared to theperiod of the line voltage. If the period of the motor voltage is notsubstantially equal to the period of the line voltage then the Step S7and Step S8 measurements are taken again and compared at Step S9. Whenthe period of the generated motor voltage becomes substantially equal tothe period of the line voltage, then the motor line voltage and currentare switched or turned on and reapplied to the electric motor in StepS10.

In FIG. 36, a method of saving energy for a pump jack with acounterweight disposed with a well in accordance with one or moreembodiments of the present invention is shown. In Step T1, electricutility grid or line voltage and current are supplied to an electricmotor connected with the pump jack during a first time segment. In StepT2, the pump jack counterweight is in a consumption mode while beingrotated by the electric motor during the first time segment. In Step T3,the phase angle between the electric utility grid or line voltage andcurrent supplied to the motor during the first time segment is observedand measured. In Step T4, the observed phase angle is compared with atarget phase angle during the first time segment. In Step T5, theelectric utility grid or line voltage and current are switched or turnedoff to the electric motor when the observed electric motor phase angleis greater than the target phase angle. If not, Step T3 is repeated. InStep T6, an electric motor voltage across the electric motor during asecond time segment after the step of switching off in Step T5 ismonitored or observed. In Step T7, the pump jack counterweight isrotated during the second time segment with the motor speeding upinitially causing a cyclic period of the electric motor voltage acrossthe electric motor to be shorter than a cyclic period of the electricutility grid or line voltage. In Step T7, the motor speeds up initiallyduring the generation mode, then the motor slows down. The period of themotor voltage is measured during Step T7. In Step T8, a period of theline voltage is determined or measured during the second time segment.In Step T9, the cyclic period of the electric motor voltage across theelectric motor is compared with the cyclic period of the electricutility grid or line voltage during the second time segment. In StepT10, the electric utility grid or line voltage and current are switchedfull on to the electric motor when the cyclic period of the electricmotor voltage returns to substantially equal to the cyclic period of theelectric utility grid or line voltage. If the period of motor voltage isnot substantially equal to the period of the line voltage, then the StepT7 and Step T8 measurements are taken again and compared at Step T9.

In FIG. 37, a method of saving energy for a pump jack with acounterweight disposed with a well in accordance with one or moreembodiments of the present invention is shown. In Step L1, electricutility grid or line voltage and current are supplied to an electricmotor connected with the pump jack during a first time segment. In StepL2, the pump jack counterweight is in a consumption mode while beingrotated by the electric motor during the first time segment. In Step L3,the phase angle between the electric utility grid or line voltage andcurrent supplied to the electric motor during the first time segment isobserved and measured. In Step L4, the observed phase angle is comparedwith a target phase angle during the first time segment. In Step L5, theelectric utility grid or line voltage and current are switched or turnedoff to the electric motor when the observed electric motor phase angleis greater than the target phase angle. If the observed phase angle isnot greater than the target phase angle, then Step L3 is repeated. InStep L6, an electric motor voltage across the electric motor ismonitored or observed during a second time segment after the Step L5 ofswitching off. In Step L7, the pump jack counterweight is rotated duringthe second time segment, with the motor speeding up initially, causing acyclic period of the electric motor voltage across the electric motor tobe shorter than a cyclic period of the electric utility grid voltage.The electric motor period is measured in Step L7. In Step L8, a periodof the line voltage is determined or measured during the second timesegment. In Step L9, the cyclic period of the electric motor voltageacross the electric motor is compared with the cyclic period of theelectric utility grid or line voltage during the second time segment. Ifthe period of motor voltage is not substantially equal to the period ofline voltage, then Step L7 and Step L8 are repeated. If the voltages areequal, then Step L10 is run. In Step L10, the electric utility grid orline voltage and current are checked as to whether the electric motor isat a zero crossing point when the cyclic period of the electric motorvoltage returns to substantially equal to the cyclic period of theelectric utility grid or line voltage. If a transition from positive tonegative of the electric motor voltage occurs at substantially the sametime as a transition from positive to negative of the electric utilitygrid or line voltage, then in Step L11 the motor voltage is turned fullon. If not, Step L10 is repeated or run again.

Advantageously, in one or more embodiments of the present invention, themethod of saving energy for a pump jack with a counterweight disposedwith a well selectively removes power to the motor when the consumptionof the motor substantially goes to zero, thereby saving energy.

Advantageously, in one or more embodiments of the present invention, themethod of saving energy for a pump jack with a counterweight disposedwith a well is fully adaptive to any well and requires no special setupprocedures.

Advantageously, in one or more embodiments of the present invention, themethod of saving energy for a pump jack with a counterweight disposedwith a well can utilize existing electric motors and pump jacks.

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having the benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein.Accordingly, the scope of the invention should be limited only by theattached claims.

We claim:
 1. A method of saving energy for an electric motor coupled toa rotating mass, the method comprising: detecting a line voltage and acurrent supplied to the electric motor; observing a phase angle betweenthe line voltage and the current; comparing the observed phase anglewith a target phase angle; switching-off the line voltage to theelectric motor when the observed phase angle is greater than the targetphase angle; monitoring a motor voltage generated at the electric motorwhile the line voltage is switched off; determining a period of thevoltage generated at the electric motor; determining a period of theline voltage; determining a line zero crossing point corresponding tothe line voltage; determining a motor zero crossing point correspondingto the voltage generated at the electric motor; and switching-on theline voltage to the electric motor when: the period of the voltagegenerated at the electric motor is substantially equal to the period ofthe line voltage; and the line zero crossing point substantially matchesthe motor zero crossing point.
 2. The method of claim 1, whereinmonitoring the motor voltage generated at the electric motor isperformed continuously while the line voltage is switched off.
 3. Themethod of claim 1, wherein said target phase angle is 90 degrees.
 4. Themethod of claim 1, wherein monitoring the motor voltage is performedwith a microprocessor.
 5. The method of claim 1, wherein switching-onthe line voltage is performed when the voltage generated at the electricmotor transitions from positive to negative at substantially a same timeas when the line voltage transitions from positive to negative.
 6. Asystem for saving energy for an electric motor coupled to a rotating orreciprocating mass, the system comprising: a processor; and anon-transitory computer-readable storage medium that stores instructionsfor controlling the processor to perform steps comprising: detecting aline voltage and a current supplied to the electric motor; observing aphase angle between the line voltage and the current; comparing theobserved phase angle with a target phase angle; switching-off the linevoltage to the electric motor when the observed phase angle is greaterthan the target phase angle; monitoring a motor voltage generated at theelectric motor while the line voltage is switched off; determining aperiod of the voltage generated at the electric motor; determining aperiod of the line voltage; and switching-on the line voltage to theelectric motor when the period of the voltage generated at the electricmotor is substantially equal to the period of the line voltage.
 7. Thesystem of claim 6, wherein the non-transitory computer readable storagemedium further stores instructions for controlling the processor toperform steps comprising: determining a line zero crossing pointcorresponding to the line voltage; determining a motor zero crossingpoint corresponding to the voltage generated at the electric motor; andswitching-on the line voltage to the electric motor when the line zerocrossing point substantially matches the motor zero crossing point. 8.The system of claim 7, wherein the non-transitory computer readablestorage medium further stores instructions for controlling the processorto switch-on the line voltage when the voltage generated at the electricmotor transitions from positive to negative at substantially a same timeas when the line voltage transitions from positive to negative.
 9. Thesystem of claim 6, wherein the non-transitory computer readable storagemedium further stores instructions for controlling the processor tocontinuously monitor the motor voltage generated at the electric motorwhile the line voltage is switched off.
 10. The system of claim 6,wherein the target phase angle is 90 degrees.
 11. The system of claim 6,wherein the non-transitory computer readable storage medium furtherstores instructions for controlling the processor to continuouslydetermine the period of the voltage generated at the electric motorwhile the line voltage is switched off.
 12. The system of claim 6,wherein the non-transitory computer readable storage medium furtherstores instructions for controlling the processor to continuouslydetermine the period of the line voltage while the line voltage isswitched off from the electric motor.
 13. The system of claim 6, whereinthe rotating mass includes a counterweight provided on a pump jack. 14.A non-transitory computer-readable storage medium storing instructionswhich, when executed by a device having an electric motor and aprocessor, cause the processor to perform steps comprising: detecting aline voltage and a current supplied to the electric motor; observing aphase angle between the line voltage and the current; comparing theobserved phase angle with a target phase angle; switching-off the linevoltage to the electric motor when the observed phase angle is greaterthan the target phase angle; monitoring a motor voltage generated at theelectric motor when the line voltage is switched off; determining aperiod of the voltage generated at the electric motor; determining aperiod of the line voltage; and switching-on the line voltage to theelectric motor when the period of the voltage generated at the electricmotor is substantially equal to the period of the line voltage.
 15. Thenon-transitory computer-readable storage medium of claim 14, whichfurther stores instructions that cause the processor to perform stepscomprising: determining a line zero crossing point corresponding to theline voltage; determining a motor zero crossing point corresponding tothe voltage generated at the electric motor; and switching-on the linevoltage to the electric motor when the line zero crossing pointsubstantially matches the motor zero crossing point.
 16. Thenon-transitory computer-readable storage medium of claim 15, whichfurther stores instructions that cause the processor to switch-on theline voltage when the voltage generated at the electric motortransitions from positive to negative at substantially a same time aswhen the line voltage transitions from positive to negative.
 17. Thenon-transitory computer-readable storage medium of claim 14, whichfurther stores instructions that cause the processor to continuouslymonitor the motor voltage generated at the electric motor while the linevoltage is switched off.
 18. The non-transitory computer-readablestorage medium of claim 14, which further stores instructions that causethe processor to continuously determine the period of the voltagegenerated at the electric motor while the line voltage is switched off.19. The non-transitory computer-readable storage medium of claim 14,which further stores instructions that cause the processor tocontinuously determine the period of the line voltage while the linevoltage is switched off from the electric motor.
 20. The non-transitorycomputer-readable storage medium of claim 14, which further storesinstructions that cause the processor to set the target phase angle at90 degrees.